home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20041116-20060924
/
000362_toastyboy@googlemail.com_Wed Jun 21 12:09:44 2006.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Path: newsmaster.cc.columbia.edu!panix!bloom-beacon.mit.edu!4.24.21.218.MISMATCH!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!r2g2000cwb.googlegroups.com!not-for-mail
From: toastyboy@googlemail.com
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Assigning output from LINEOUT to a variable
Date: 20 Jun 2006 08:14:18 -0700
Organization: http://groups.google.com
Lines: 49
Message-ID: <1150816457.938186.136820@r2g2000cwb.googlegroups.com>
References: <1150811644.629253.47720@r2g2000cwb.googlegroups.com>
<slrne9g25a.h41.fdc@sesame.cc.columbia.edu>
NNTP-Posting-Host: 64.69.191.231
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1150816461 9914 127.0.0.1 (20 Jun 2006 15:14:21 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 20 Jun 2006 15:14:21 +0000 (UTC)
In-Reply-To: <slrne9g25a.h41.fdc@sesame.cc.columbia.edu>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 TROW-ISA1
Complaints-To: groups-abuse@google.com
Injection-Info: r2g2000cwb.googlegroups.com; posting-host=64.69.191.231;
posting-account=9CvZkQ0AAABEiymyFVJPVVB65tz-PEMS
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15619
Frank,
Thanks for your response.
Regarding parsing the output, here is what I would simply expect to see
either a 1 or a 0 (depending on the state of the input) followed by a #
on a new line.
(The # is the command prompt on this device if you like)
See the below extract from an interactive session:
#
#I1
1
#I2
1
#I3
1
#I4
0
#
What I want is either to set the 0 or 1 as a variable and then based on
this write out a file with the 0 or 1 in it, or (better still) write
the 0 or 1 out to a file directly.
Thanks for the comprehensive response by the way, it is much
appreciated.
As a bit of background, what I am actually doing is effectively making
a file based interface to this serial module, it has 8 outputs and 4
inputs which can be either on (1) or off (0) I want to be able to
control it via 12 files OUT11 - 18 and IN11-14 who's content is either
a 1 or 0 to represent the desired output of the out lines, or the
actual status of the in lines.
I'm actually using it already to do some really cool home automation
stuff (I have 5 of these devices) and other assorted stuff, but the
current setup where I call the kermit script via a bash script (and
have to open and configure the serial connection each time) is really
slow and cpu intensive, so the plan is to have this new deamon
constantly looping and reading the status of the module and then I have
lots of shell scripts that check these files and make decisions based
on them... but I guess this is a bit off topic so I'll stop now!! ;-)
Thanks again
-Dan Mc